import java.util.Scanner;

public class TestDay38 {


    //红与黑
    public static void main1(String[] args) {
        //深度遍历
        //
        Scanner scanner = new Scanner(System.in);
        int m = scanner.nextInt();
        int n = scanner.nextInt();
        char[][] array = new char[m][n];
        boolean[][] p = new boolean[m][n];//标记是否遍历了
        int x = 0;
        int y = 0;//记录起始位置
        scanner.nextLine();
        for (int i = 0; i < m; i++) {
            String str = scanner.nextLine();
            for (int j = 0; j < n; j++) {
                //这样就避免后续在拿到起始位置之后还需要对比的问题
                //因为起始位置只有一个
                if(x == 0 && y == 0){
                    if(str.charAt(j) == '@'){
                        x = i;
                        y = j;
                    }
                }
                array[i][j] = str.charAt(j);
            }
        }
        //横坐标,纵坐标,以及判断是否是被遍历过,还有需要判断是否是黑瓷砖
       int count = func(x,y,p,array);
        System.out.println(count);
    }

    private static int func(int x, int y, boolean[][] p,char[][]array) {
        //防止越界
        //如果为true说明被遍历过直接返回
        if(p[x][y]){
            return 0;
        }
        //没有被遍历过,先进行标记
        p[x][y] = true;
        //东
        int count = 0;
        if(y+1 != p[0].length && array[x][y+1] == '.'){

            //如果是.就走进去
             count += func(x,y+1,p,array);
        }
        //南
        if(x+1 != p.length && array[x+1][y] == '.'){
            //如果是.就走进去
             count += func(x+1,y,p,array);
        }
        //西
        if(y-1 != -1 && array[x][y-1] == '.'){
            //如果是.就走进去
            count += func(x,y-1,p,array);
        }
        //北
        if(x-1 != -1 && array[x-1][y] == '.'){
            //如果是.就走进去
            count += func(x-1,y,p,array);
        }
        return count+1;//需要加上自己的结点

    }

    //蘑菇矩阵
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int m = scanner.nextInt();
            int n = scanner.nextInt();
            char[][]array = new char[m+1][n+1];
            //从1,1为起点
            int k = scanner.nextInt();
            for (int i = 0; i < k; i++) {
                int x = scanner.nextInt();
                int y = scanner.nextInt();
                array[x][y] = '*';//*就是蘑菇
            }
            //下面就是动归
            double[][] p = new double[m+1][n+1];
            p[1][1] = 1;
            for (int i = 1; i <= m; i++) {
                for (int j = 1; j <= n; j++) {
                    //只有在i j 不同时为1的时候才进
                   if(!(i == 1 && j == 1)){
                       double a = 0.5*p[i][j-1];
                       double b = 0.5*p[i-1][j];
                       //判断是不是边界,并且不能是蘑菇
                       if(array[i][j] != '*') {
                        if(i == m){
                            a = p[i][j-1];
                        }
                        if(j == n){
                            b = p[i-1][j];
                        }
                           p[i][j] = a+b;
                       }
                   }
                }

            }
            System.out.printf("%.2f\n",p[m][n]);
        }
    }
}
